<script setup>
  import { cityStore } from '@/biz/city'
  import config from '@/config'
  import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'

  onLaunch(() => {
    console.log('App Launch')
    cityStore().update()

    wx.getPrivacySetting({
      success: (res) => console.log('getPrivacySetting:', res)
    })
  })
  onShow(() => {
    console.log('App Show')
    config.checkNetwork()
    uni.$emit('onShow')
  })
  onHide(() => {
    console.log('App Hide')
  })
</script>

<style lang="scss">
  @import './style/main.scss';

  uni-page-body,
  html,
  body {
    height: 100%;
  }
  page {
    background: #f5f5f5;
  }
</style>
